|
RAIS
3.2
|
00001 00027 using System; 00028 using System.Collections.Generic; 00029 using System.Text; 00030 using System.Web.UI; 00031 using System.Web.UI.WebControls; 00032 00033 using RAIS.ApplicationLogicLayer; 00034 using RAIS.Common.UserManagement; 00035 00036 namespace RAIS.UI.Common 00037 { 00041 public class MessageDisplay 00042 { 00051 public static void DisplayReturnMessage(Label label, string message, bool success) 00052 { 00053 Page page = label.Page; 00054 if (success) 00055 label.ForeColor = System.Drawing.Color.Green; 00056 else 00057 label.ForeColor = System.Drawing.Color.Red; 00058 00059 UserData currentUseer = (UserData)page.Session[UI.Common.Constants.CURRENT_USER_TAG]; 00060 if (currentUseer != null) 00061 { 00062 string translatedString = RAIS.ApplicationLogicLayer.Localisation.Translate(message, 00063 RAIS.Common.Messages.TRANSLATION_CONTEXT, 00064 RAIS.Common.Constants.DEFAULT_LANGUAGE, 00065 currentUseer.Language); 00066 label.Text = translatedString; 00067 } 00068 } 00069 } 00070 }